/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.model.generators.modelproviders;

import java.awt.Color;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.interpolators.Linear;
import pl.edu.amu.wmi.kino.visualjavafx.model.animation.transformations.ChangeOpacity;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.ModelChangeEvent;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.ModelChangeListener;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.VisualJavaFxModelProvider;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelCanvasGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelChangeOpacityGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelCircleGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.generators.ModelFrameGenerator;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Application;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Canvas;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Frame;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.shapes.Circle;

/**
 *Simple model with only one static Circle which changes opacity
 * @author Admin
 */


public class CircleTest1Provider implements VisualJavaFxModelProvider{

    @Override
    public Application getModel() {
        Application app = new Application();
        ArrayList<Frame> frames = app.getFrames();
        Canvas can = ModelCanvasGenerator.generateCanvas(Color.PINK);

        Circle c = ModelCircleGenerator.generateCircle(500, 300, 100, Color.RED, Color.GREEN,
                5);
        ChangeOpacity c1 = ModelChangeOpacityGenerator.generateChangeOpacity(new Linear(), 0.0);
        ChangeOpacity c2 = ModelChangeOpacityGenerator.generateChangeOpacity(new Linear(), 1.0);
        c.getTimeline().getKeyFrameAt(6).getTransformations().add(c2);
        c.getTimeline().getKeyFrameAt(3).getTransformations().add(c1);


        Frame f = ModelFrameGenerator.generateFrame(1000, 800, 50, 50, "test", can);
        frames.add(f);

        return app;

    }

     @Override
    public void addModelChangeListener(ModelChangeListener listener) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void notifyModelChange(ModelChangeEvent evt) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void removeModelChangeListener(ModelChangeListener listener) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
